package body v8.Class_Handle_Scope is

   --------------
   -- Finalize --
   --------------

   overriding procedure Finalize (This : in out Handle_Scope) is
   begin
      Cxx_HandleScope.Destroy(This.Internal);
   end Finalize;


   function Close
     (this  : access Handle_Scope;
      value : Handles.Handle
     ) return Handles.Local
     is
      function Invoke
        (this  : in out Cxx_HandleScope.HandleScope;
         value : Pointer
        ) return Handles.Local;
      pragma Import (CPP, Invoke, "_ZN2v811HandleScope8RawCloseEPPNS_8internal6ObjectE");
   begin
      return Invoke (this.Internal, value.As_Object);
   end Close;
   pragma Inline(Close);

end v8.Class_Handle_Scope;
